package com.sex.spring.model;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.*;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GeneratorType;


/**
 * 
 * @author Daven
 *每个POJO实体类必须实现序列化
 */
@Entity
@Table(name = "sex_user")
public class User implements Serializable{

	private static final long serialVersionUID = 1L;
	private int userId;
	private String userName;
	private String password;
	private String sex;
	private double balance;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public double getBalance() {
		return balance;
	}
	public void setBalance(double balance) {
		this.balance = balance;
	}
	@Override
	public String toString() {
		return "User [userId=" + userId + ", userName=" + userName + ", password=" + password + ", sex=" + sex
				+ ", balance=" + balance + "]";
	}
	

	



}
